"use strict";(self.webpackChunkpeaches=self.webpackChunkpeaches||[]).push([[7304],{47304:function(e,t,s){s.d(t,{Ay:function(){return m}});let i={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};let Logger=class Logger{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||i,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Logger(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Logger(this.logger,e)}};var r=new Logger;let EventEmitter=class EventEmitter{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let s=this.observers[e].get(t)||0;this.observers[e].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];if(this.observers[e]){let t=Array.from(this.observers[e].entries());t.forEach(e=>{let[t,i]=e;for(let e=0;e<i;e++)t(...s)})}if(this.observers["*"]){let t=Array.from(this.observers["*"].entries());t.forEach(t=>{let[i,r]=t;for(let t=0;t<r;t++)i.apply(i,[e,...s])})}}};function defer(){let e,t;let s=new Promise((s,i)=>{e=s,t=i});return s.resolve=e,s.reject=t,s}function makeString(e){return null==e?"":""+e}let n=/###/g;function getLastOfPath(e,t,s){function cleanKey(e){return e&&e.indexOf("###")>-1?e.replace(n,"."):e}function canNotTraverseDeeper(){return!e||"string"==typeof e}let i="string"!=typeof t?t:t.split("."),r=0;for(;r<i.length-1;){if(canNotTraverseDeeper())return{};let t=cleanKey(i[r]);!e[t]&&s&&(e[t]=new s),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++r}return canNotTraverseDeeper()?{}:{obj:e,k:cleanKey(i[r])}}function setPath(e,t,s){let{obj:i,k:r}=getLastOfPath(e,t,Object);if(void 0!==i||1===t.length){i[r]=s;return}let n=t[t.length-1],o=t.slice(0,t.length-1),a=getLastOfPath(e,o,Object);for(;void 0===a.obj&&o.length;)n=`${o[o.length-1]}.${n}`,(a=getLastOfPath(e,o=o.slice(0,o.length-1),Object))&&a.obj&&void 0!==a.obj[`${a.k}.${n}`]&&(a.obj=void 0);a.obj[`${a.k}.${n}`]=s}function getPath(e,t){let{obj:s,k:i}=getLastOfPath(e,t);if(s)return s[i]}function regexEscape(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var o={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function escape(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,e=>o[e]):e}let a=[" ",",","?","!",";"],l=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}(20);function deepFind(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];let i=t.split(s),r=e;for(let e=0;e<i.length;){let t;if(!r||"object"!=typeof r)return;let n="";for(let o=e;o<i.length;++o)if(o!==e&&(n+=s),n+=i[o],void 0!==(t=r[n])){if(["string","number","boolean"].indexOf(typeof t)>-1&&o<i.length-1)continue;e+=o-e+1;break}r=t}return r}function getCleanedCode(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}let ResourceStore=class ResourceStore extends EventEmitter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let i,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?i=e.split("."):(i=[e,t],s&&(Array.isArray(s)?i.push(...s):"string"==typeof s&&n?i.push(...s.split(n)):i.push(s)));let a=getPath(this.data,i);return(!a&&!t&&!s&&e.indexOf(".")>-1&&(e=i[0],t=i[1],s=i.slice(2).join(".")),a||!o||"string"!=typeof s)?a:deepFind(this.data&&this.data[e]&&this.data[e][t],s,n)}addResource(e,t,s,i){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},n=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=[e,t];s&&(o=o.concat(n?s.split(n):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),setPath(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(let i in s)("string"==typeof s[i]||"[object Array]"===Object.prototype.toString.apply(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let a=getPath(this.data,o)||{};n.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?function deepExtend(e,t,s){for(let i in t)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof t[i]||t[i]instanceof String?s&&(e[i]=t[i]):deepExtend(e[i],t[i],s):e[i]=t[i]);return e}(a,s,r):a={...a,...s},setPath(this.data,o,a),n.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return(t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e),s=t&&Object.keys(t)||[];return!!s.find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}};var h={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,i,r){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,s,i,r))}),t}};let u={};let Translator=class Translator extends EventEmitter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),function(e,t,s){e.forEach(e=>{t[e]&&(s[e]=t[e])})}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=r.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;let s=this.resolve(e,t);return s&&void 0!==s.res}extractFromKey(e,t){let s=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===s&&(s=":");let i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,r=t.ns||this.options.defaultNS||[],n=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!function(e,t,s){t=t||"",s=s||"";let i=a.filter(e=>0>t.indexOf(e)&&0>s.indexOf(e));if(0===i.length)return!0;let r=l.getRegExp(`(${i.map(e=>"?"===e?"\\?":e).join("|")})`),n=!r.test(e);if(!n){let t=e.indexOf(s);t>0&&!r.test(e.substring(0,t))&&(n=!0)}return n}(e,s,i);if(n&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r};let n=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(n[0])>-1)&&(r=n.shift()),e=n.join(i)}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}translate(e,t,s){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);let i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:n,namespaces:o}=this.extractFromKey(e[e.length-1],t),a=o[o.length-1],l=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&"cimode"===l.toLowerCase()){if(h){let e=t.nsSeparator||this.options.nsSeparator;return i?{res:`${a}${e}${n}`,usedKey:n,exactUsedKey:n,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:`${a}${e}${n}`}return i?{res:n,usedKey:n,exactUsedKey:n,usedLng:l,usedNS:a,usedParams:this.getUsedParamsDetails(t)}:n}let u=this.resolve(e,t),p=u&&u.res,g=u&&u.usedKey||n,d=u&&u.exactUsedKey||n,c=Object.prototype.toString.apply(p),f=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,y="string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p;if(m&&p&&y&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(c)&&!("string"==typeof f&&"[object Array]"===c)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,{...t,ns:o}):`key '${n} (${this.language})' returned an object instead of string.`;return i?(u.res=e,u.usedParams=this.getUsedParamsDetails(t),u):e}if(r){let e="[object Array]"===c,s=e?[]:{},i=e?d:g;for(let e in p)if(Object.prototype.hasOwnProperty.call(p,e)){let n=`${i}${r}${e}`;s[e]=this.translate(n,{...t,joinArrays:!1,ns:o}),s[e]===n&&(s[e]=p[e])}p=s}}else if(m&&"string"==typeof f&&"[object Array]"===c)(p=p.join(f))&&(p=this.extendTranslation(p,e,t,s));else{let i=!1,o=!1,h=void 0!==t.count&&"string"!=typeof t.count,g=Translator.hasDefaultValue(t),d=h?this.pluralResolver.getSuffix(l,t.count,t):"",c=t.ordinal&&h?this.pluralResolver.getSuffix(l,t.count,{ordinal:!1}):"",f=h&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=f&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${d}`]||t[`defaultValue${c}`]||t.defaultValue;!this.isValidLookup(p)&&g&&(i=!0,p=m),this.isValidLookup(p)||(o=!0,p=n);let y=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,v=y&&o?void 0:p,b=g&&m!==p&&this.options.updateMissing;if(o||i||b){if(this.logger.log(b?"updateKey":"missingKey",l,a,n,b?m:p),r){let e=this.resolve(n,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],s=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&s&&s[0])for(let t=0;t<s.length;t++)e.push(s[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);let send=(e,s,i)=>{let r=g&&i!==p?i:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,a,s,r,b,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,a,s,r,b,t),this.emit("missingKey",e,a,s,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&h?e.forEach(e=>{let s=this.pluralResolver.getSuffixes(e,t);f&&t[`defaultValue${this.options.pluralSeparator}zero`]&&0>s.indexOf(`${this.options.pluralSeparator}zero`)&&s.push(`${this.options.pluralSeparator}zero`),s.forEach(s=>{send([e],n+s,t[`defaultValue${s}`]||m)})}):send(e,n,m))}p=this.extendTranslation(p,e,t,u,s),o&&p===n&&this.options.appendNamespaceToMissingKey&&(p=`${a}:${n}`),(o||i)&&this.options.parseMissingKeyHandler&&(p="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${n}`:n,i?p:void 0):this.options.parseMissingKeyHandler(p))}return i?(u.res=p,u.usedParams=this.getUsedParamsDetails(t),u):p}extendTranslation(e,t,s,i,r){var n=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){let o;s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});let a="string"==typeof e&&(s&&s.interpolation&&void 0!==s.interpolation.skipOnVariables?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let l=s.replace&&"string"!=typeof s.replace?s.replace:s;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,s.lng||this.language,s),a){let t=e.match(this.interpolator.nestingRegexp),i=t&&t.length;o<i&&(s.nest=!1)}!s.lng&&"v1"!==this.options.compatibilityAPI&&i&&i.res&&(s.lng=i.usedLng),!1!==s.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];return r&&r[0]===i[0]&&!s.context?(n.logger.warn(`It seems you are nesting recursively key: ${i[0]} in key: ${t[0]}`),null):n.translate(...i,t)},s)),s.interpolation&&this.interpolator.reset()}let o=s.postProcess||this.options.postProcess,a="string"==typeof o?[o]:o;return null!=e&&a&&a.length&&!1!==s.applyPostProcessor&&(e=h.handle(a,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t,s,i,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;let a=this.extractFromKey(e,o),l=a.key;s=l;let h=a.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));let p=void 0!==o.count&&"string"!=typeof o.count,g=p&&!o.ordinal&&0===o.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==o.context&&("string"==typeof o.context||"number"==typeof o.context)&&""!==o.context,c=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);h.forEach(e=>{this.isValidLookup(t)||(n=e,!u[`${c[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(n)&&(u[`${c[0]}-${e}`]=!0,this.logger.warn(`key "${s}" for languages "${c.join(", ")}" won't get resolved as namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),c.forEach(s=>{let n;if(this.isValidLookup(t))return;r=s;let a=[l];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(a,l,s,e,o);else{let e;p&&(e=this.pluralResolver.getSuffix(s,o.count,o));let t=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(a.push(l+e),o.ordinal&&0===e.indexOf(i)&&a.push(l+e.replace(i,this.options.pluralSeparator)),g&&a.push(l+t)),d){let s=`${l}${this.options.contextSeparator}${o.context}`;a.push(s),p&&(a.push(s+e),o.ordinal&&0===e.indexOf(i)&&a.push(s+e.replace(i,this.options.pluralSeparator)),g&&a.push(s+t))}}for(;n=a.pop();)this.isValidLookup(t)||(i=n,t=this.getResource(s,e,n,o))}))})}),{res:t,usedKey:s,exactUsedKey:i,usedLng:r,usedNS:n}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,i)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.replace&&"string"!=typeof e.replace,s=t?e.replace:e;if(t&&void 0!==e.count&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!t)for(let e of(s={...s},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete s[e];return s}static hasDefaultValue(e){let t="defaultValue";for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&void 0!==e[s])return!0;return!1}};function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}let LanguageUtil=class LanguageUtil{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=r.create("languageUtils")}getScriptPartFromCode(e){if(!(e=getCleanedCode(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=getCleanedCode(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){let t=["hans","hant","latn","cyrl","cans","mong","arab"],s=e.split("-");return this.options.lowerCaseLng?s=s.map(e=>e.toLowerCase()):2===s.length?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=capitalize(s[1].toLowerCase()))):3===s.length&&(s[0]=s[0].toLowerCase(),2===s[1].length&&(s[1]=s[1].toUpperCase()),"sgn"!==s[0]&&2===s[2].length&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=capitalize(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=capitalize(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let s=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let s=this.getLanguagePartFromCode(e);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(e=>{if(e===s||!(0>e.indexOf("-")&&0>s.indexOf("-"))&&(e.indexOf("-")>0&&0>s.indexOf("-")&&e.substring(0,e.indexOf("-"))===s||0===e.indexOf(s)&&s.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){let s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],addCode=e=>{e&&(this.isSupportedCode(e)?i.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&addCode(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&addCode(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&addCode(this.getLanguagePartFromCode(e))):"string"==typeof e&&addCode(this.formatLanguageCode(e)),s.forEach(e=>{0>i.indexOf(e)&&addCode(this.formatLanguageCode(e))}),i}};let p=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],g={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},d=["v1","v2","v3"],c=["v4"],f={zero:0,one:1,two:2,few:3,many:4,other:5};let PluralResolver=class PluralResolver{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=r.create("pluralResolver"),(!this.options.compatibilityJSON||c.includes(this.options.compatibilityJSON))&&("undefined"==typeof Intl||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=function(){let e={};return p.forEach(t=>{t.lngs.forEach(s=>{e[s]={numbers:t.nr,plurals:g[t.fc]}})}),e}()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(getCleanedCode("dev"===e?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,s).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((e,t)=>f[e]-f[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):s.numbers.map(s=>this.getSuffix(e,s,t)):[]}getSuffix(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:this.getSuffixRetroCompatible(i,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){let s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[s];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));let returnSuffix=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?`_plural_${i.toString()}`:returnSuffix():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?returnSuffix():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!d.includes(this.options.compatibilityJSON)}};function deepFindWithDefaults(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",r=!(arguments.length>4)||void 0===arguments[4]||arguments[4],n=function(e,t,s){let i=getPath(e,s);return void 0!==i?i:getPath(t,s)}(e,t,s);return!n&&r&&"string"==typeof s&&void 0===(n=deepFind(e,s,i))&&(n=deepFind(t,s,i)),n}let Interpolator=class Interpolator{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});let t=e.interpolation;this.escape=void 0!==t.escape?t.escape:escape,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?regexEscape(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?regexEscape(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?regexEscape(t.nestingPrefix):t.nestingPrefixEscaped||regexEscape("$t("),this.nestingSuffix=t.nestingSuffix?regexEscape(t.nestingSuffix):t.nestingSuffixEscaped||regexEscape(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let getOrResetRegExp=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=getOrResetRegExp(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=getOrResetRegExp(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=getOrResetRegExp(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,s,i){let r,n,o;let a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function regexSafe(e){return e.replace(/\$/g,"$$$$")}let handleFormat=e=>{if(0>e.indexOf(this.formatSeparator)){let r=deepFindWithDefaults(t,a,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(r,void 0,s,{...i,...t,interpolationkey:e}):r}let r=e.split(this.formatSeparator),n=r.shift().trim(),o=r.join(this.formatSeparator).trim();return this.format(deepFindWithDefaults(t,a,n,this.options.keySeparator,this.options.ignoreJSONStructure),o,s,{...i,...t,interpolationkey:n})};this.resetRegExp();let l=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,h=i&&i.interpolation&&void 0!==i.interpolation.skipOnVariables?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,u=[{regex:this.regexpUnescape,safeValue:e=>regexSafe(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?regexSafe(this.escape(e)):regexSafe(e)}];return u.forEach(t=>{for(o=0;r=t.regex.exec(e);){let s=r[1].trim();if(void 0===(n=handleFormat(s))){if("function"==typeof l){let t=l(e,r,i);n="string"==typeof t?t:""}else if(i&&Object.prototype.hasOwnProperty.call(i,s))n="";else if(h){n=r[0];continue}else this.logger.warn(`missed to pass in variable ${s} for interpolating ${e}`),n=""}else"string"==typeof n||this.useRawValueToEscape||(n=makeString(n));let a=t.safeValue(n);if(e=e.replace(r[0],a),h?(t.regex.lastIndex+=n.length,t.regex.lastIndex-=r[0].length):t.regex.lastIndex=0,++o>=this.maxReplaces)break}}),e}nest(e,t){let s,i,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function handleHasOptions(e,t){let s=this.nestingOptionsSeparator;if(0>e.indexOf(s))return e;let i=e.split(RegExp(`${s}[ ]*{`)),n=`{${i[1]}`;e=i[0],n=this.interpolate(n,r);let o=n.match(/'/g),a=n.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(n=n.replace(/'/g,'"'));try{r=JSON.parse(n),t&&(r={...t,...r})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${s}${n}`}return delete r.defaultValue,e}for(;s=this.nestingRegexp.exec(e);){let o=[];(r=(r={...n}).replace&&"string"!=typeof r.replace?r.replace:r).applyPostProcessor=!1,delete r.defaultValue;let a=!1;if(-1!==s[0].indexOf(this.formatSeparator)&&!/{.*}/.test(s[1])){let e=s[1].split(this.formatSeparator).map(e=>e.trim());s[1]=e.shift(),o=e,a=!0}if((i=t(handleHasOptions.call(this,s[1].trim(),r),r))&&s[0]===e&&"string"!=typeof i)return i;"string"!=typeof i&&(i=makeString(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),a&&(i=o.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}};function createCachedFormatter(e){let t={};return function(s,i,r){let n=i+JSON.stringify(r),o=t[n];return o||(o=e(getCleanedCode(i),r),t[n]=o),o(s)}}let Formatter=class Formatter{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=r.create("formatter"),this.options=e,this.formats={number:createCachedFormatter((e,t)=>{let s=new Intl.NumberFormat(e,{...t});return e=>s.format(e)}),currency:createCachedFormatter((e,t)=>{let s=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>s.format(e)}),datetime:createCachedFormatter((e,t)=>{let s=new Intl.DateTimeFormat(e,{...t});return e=>s.format(e)}),relativetime:createCachedFormatter((e,t)=>{let s=new Intl.RelativeTimeFormat(e,{...t});return e=>s.format(e,t.range||"day")}),list:createCachedFormatter((e,t)=>{let s=new Intl.ListFormat(e,{...t});return e=>s.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},s=t.interpolation;this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=createCachedFormatter(t)}format(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=t.split(this.formatSeparator),n=r.reduce((e,t)=>{let{formatName:r,formatOptions:n}=function(e){let t=e.toLowerCase().trim(),s={};if(e.indexOf("(")>-1){let i=e.split("(");t=i[0].toLowerCase().trim();let r=i[1].substring(0,i[1].length-1);if("currency"===t&&0>r.indexOf(":"))s.currency||(s.currency=r.trim());else if("relativetime"===t&&0>r.indexOf(":"))s.range||(s.range=r.trim());else{let e=r.split(";");e.forEach(e=>{if(!e)return;let[t,...i]=e.split(":"),r=i.join(":").trim().replace(/^'+|'+$/g,"");s[t.trim()]||(s[t.trim()]=r),"false"===r&&(s[t.trim()]=!1),"true"===r&&(s[t.trim()]=!0),isNaN(r)||(s[t.trim()]=parseInt(r,10))})}}return{formatName:t,formatOptions:s}}(t);if(this.formats[r]){let t=e;try{let o=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},a=o.locale||o.lng||i.locale||i.lng||s;t=this.formats[r](e,a,{...n,...i,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${r}`),e},e);return n}};let Connector=class Connector extends EventEmitter{constructor(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=r.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,i.backend,i)}queueLoad(e,t,s,i){let r={},n={},o={},a={};return e.forEach(e=>{let i=!0;t.forEach(t=>{let o=`${e}|${t}`;!s.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(1===this.state[o]?void 0===n[o]&&(n[o]=!0):(this.state[o]=1,i=!1,void 0===n[o]&&(n[o]=!0),void 0===r[o]&&(r[o]=!0),void 0===a[t]&&(a[t]=!0)))}),i||(o[e]=!0)}),(Object.keys(r).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(n),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(a)}}loaded(e,t,s){let i=e.split("|"),r=i[0],n=i[1];t&&this.emit("failedLoading",r,n,t),s&&this.store.addResourceBundle(r,n,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;let o={};this.queue.forEach(s=>{(function(e,t,s,i){let{obj:r,k:n}=getLastOfPath(e,t,Object);r[n]=r[n]||[],i&&(r[n]=r[n].concat(s)),i||r[n].push(s)})(s.loaded,[r],n),void 0!==s.pending[e]&&(delete s.pending[e],s.pendingCount--),t&&s.errors.push(t),0!==s.pendingCount||s.done||(Object.keys(s.loaded).forEach(e=>{o[e]||(o[e]={});let t=s.loaded[e];t.length&&t.forEach(t=>{void 0===o[e][t]&&(o[e][t]=!0)})}),s.done=!0,s.errors.length?s.callback(s.errors):s.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,s){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,n=arguments.length>5?arguments[5]:void 0;if(!e.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:i,wait:r,callback:n});return}this.readingCalls++;let resolver=(o,a)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&a&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,2*r,n)},r);return}n(o,a)},o=this.backend[s].bind(this.backend);if(2===o.length){try{let s=o(e,t);s&&"function"==typeof s.then?s.then(e=>resolver(null,e)).catch(resolver):resolver(null,s)}catch(e){resolver(e)}return}return o(e,t,resolver)}prepareLoading(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);let r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(s,n)=>{s&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,s),!s&&n&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,n),this.loaded(e,s,n)})}saveMissing(e,t,s,i,r){let n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(null!=s&&""!==s){if(this.backend&&this.backend.create){let a={...n,isUpdate:r},l=this.backend.create.bind(this.backend);if(l.length<6)try{let r;(r=5===l.length?l(e,t,s,i,a):l(e,t,s,i))&&"function"==typeof r.then?r.then(e=>o(null,e)).catch(o):o(null,r)}catch(e){o(e)}else l(e,t,s,i,o,a)}e&&e[0]&&this.store.addResource(e[0],t,s,i)}}};function get(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let s=e[3]||e[2];Object.keys(s).forEach(e=>{t[e]=s[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function transformOptions(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&0>e.supportedLngs.indexOf("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function noop(){}let I18n=class I18n extends EventEmitter{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=transformOptions(e),this.services={},this.logger=r,this.modules={external:[]},!function(e){let t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})}(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(s=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:0>t.ns.indexOf("translation")&&(t.defaultNS=t.ns[0]));let i=get();function createClassOnDemand(e){return e?"function"==typeof e?new e:e:null}if(this.options={...i,...this.options,...transformOptions(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){let t;this.modules.logger?r.init(createClassOnDemand(this.modules.logger),this.options):r.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Formatter);let s=new LanguageUtil(this.options);this.store=new ResourceStore(this.options.resources,this.options);let n=this.services;n.logger=r,n.resourceStore=this.store,n.languageUtils=s,n.pluralResolver=new PluralResolver(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),t&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(n.formatter=createClassOnDemand(t),n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new Interpolator(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Connector(createClassOnDemand(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on("*",function(t){for(var s=arguments.length,i=Array(s>1?s-1:0),r=1;r<s;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.languageDetector&&(n.languageDetector=createClassOnDemand(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=createClassOnDemand(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Translator(this.services,this.options),this.translator.on("*",function(t){for(var s=arguments.length,i=Array(s>1?s-1:0),r=1;r<s;r++)i[r-1]=arguments[r];e.emit(t,...i)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,s||(s=noop),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});let n=defer(),load=()=>{let finish=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(t),s(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return finish(null,this.t.bind(this));this.changeLanguage(this.options.lng,finish)};return this.options.resources||!this.options.initImmediate?load():setTimeout(load,0),n}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,s=t,i="string"==typeof e?e:this.language;if("function"==typeof e&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return s();let e=[],append=t=>{if(!t||"cimode"===t)return;let s=this.services.languageUtils.toResolveHierarchy(t);s.forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};if(i)append(i);else{let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.forEach(e=>append(e))}this.options.preload&&this.options.preload.forEach(e=>append(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),s(e)})}else s(null)}reloadResources(e,t,s){let i=defer();return e||(e=this.languages),t||(t=this.options.ns),s||(s=noop),this.services.backendConnector.reload(e,t,e=>{i.resolve(),s(e)}),i}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&h.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;let i=defer();this.emit("languageChanging",e);let setLngProps=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},done=(e,r)=>{r?(setLngProps(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit("languageChanged",r),this.logger.log("languageChanged",r)):this.isLanguageChangingTo=void 0,i.resolve(function(){return s.t(...arguments)}),t&&t(e,function(){return s.t(...arguments)})},setLng=t=>{e||t||!this.services.languageDetector||(t=[]);let s="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);s&&(this.language||setLngProps(s),this.translator.language||this.translator.changeLanguage(s),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(s)),this.loadResources(s,e=>{done(e,s)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(setLng):this.services.languageDetector.detect(setLng):setLng(e):setLng(this.services.languageDetector.detect()),i}getFixedT(e,t,s){var i=this;let fixedT=function(e,t){let r,n;if("object"!=typeof t){for(var o=arguments.length,a=Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];r=i.options.overloadTranslationOptionHandler([e,t].concat(a))}else r={...t};r.lng=r.lng||fixedT.lng,r.lngs=r.lngs||fixedT.lngs,r.ns=r.ns||fixedT.ns,r.keyPrefix=r.keyPrefix||s||fixedT.keyPrefix;let h=i.options.keySeparator||".";return n=r.keyPrefix&&Array.isArray(e)?e.map(e=>`${r.keyPrefix}${h}${e}`):r.keyPrefix?`${r.keyPrefix}${h}${e}`:e,i.t(n,r)};return"string"==typeof e?fixedT.lng=e:fixedT.lngs=e,fixedT.ns=t,fixedT.keyPrefix=s,fixedT}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let s=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===s.toLowerCase())return!0;let loadNotPending=(e,t)=>{let s=this.services.backendConnector.state[`${e}|${t}`];return -1===s||2===s};if(t.precheck){let e=t.precheck(this,loadNotPending);if(void 0!==e)return e}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||loadNotPending(s,e)&&(!i||loadNotPending(r,e)))}loadNamespaces(e,t){let s=defer();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){let s=defer();"string"==typeof e&&(e=[e]);let i=this.options.preload||[],r=e.filter(e=>0>i.indexOf(e));return r.length?(this.options.preload=i.concat(r),this.loadResources(e=>{s.resolve(),t&&t(e)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";let t=this.services&&this.services.languageUtils||new LanguageUtil(get());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new I18n(e,t)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:noop,s=e.forkResourceStore;s&&delete e.forkResourceStore;let i={...this.options,...e,isClone:!0},r=new I18n(i);return(void 0!==e.debug||void 0!==e.prefix)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(e=>{r[e]=this[e]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new ResourceStore(this.store.data,i),r.services.resourceStore=r.store),r.translator=new Translator(r.services,i),r.translator.on("*",function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];r.emit(e,...s)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}};let m=I18n.createInstance();m.createInstance=I18n.createInstance,m.createInstance,m.dir,m.init,m.loadResources,m.reloadResources,m.use,m.changeLanguage,m.getFixedT,m.t,m.exists,m.setDefaultNamespace,m.hasLoadedNamespace,m.loadNamespaces,m.loadLanguages}}]);